package com.ddy.test;

public class SubString {
	public static void main(String[] args) {
		System.err.println("sso,bxn-core-platform,bxn-core-uic,bxn-portal's length:" + "sso,bxn-core-platform,bxn-core-uic,bxn-portal".length());
		String p = "bxn-core-platform";
		String s = "sso";
		System.out.println(p.substring(p.lastIndexOf("-")+1,p.length()));
		System.out.println(s.substring(s.lastIndexOf("-")+1,s.length()));
		String apps = "sso,bxn-core-platform,bxn-core-uic,bxn-portal,";
		System.out.println(apps.length());
		System.out.println(apps.substring(0,1));
		
		String appLabel = "BX999-bxn-portal";
        System.out.println("BX999-bxn-portal : "+appLabel.substring(0,appLabel.indexOf("-")));
        String podName = "bx802-mysql-s-57qfk";
        System.out.println(podName.substring(0,podName.lastIndexOf("-")));
        
        String masterStatus = "mysql-bin.000004 484 mysql";
        String[] masterStatusArray = masterStatus.split(" ");
        System.out.println(masterStatusArray.length);
        System.out.println(masterStatusArray[0]);
        System.out.println(masterStatusArray[1]);
        System.out.println(masterStatusArray[2]);
        
        String rcName = "BX999-bxn-portal";
		System.out.println("getAppName: " + rcName.substring(rcName.indexOf("-")+1,rcName.length()));
		
		String schoolCode = "BXAD999";
		String sub = schoolCode.substring(schoolCode.length()-3,schoolCode.length());
		System.out.println(sub);
		
		String portName = "teacherevaluation";
		System.out.println(portName.substring(0,15));
		
		String className = "小学2017届";
		
		System.out.println("原始字符串：" + className + " : 字节数是: " + className.getBytes().length);  
		System.out.println(className.substring(2,6));
	}
}
